using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace XiaoMan.Model.Models.Mapping
{
    public class Sys_UserInfoMap : EntityTypeConfiguration<Sys_UserInfo>
    {
        public Sys_UserInfoMap()
        {
            // Primary Key
            this.HasKey(t => t.UserInfoID);

            // Properties
            this.Property(t => t.Address)
                .HasMaxLength(50);

            this.Property(t => t.Name)
                .HasMaxLength(25);

            this.Property(t => t.Intro)
                .HasMaxLength(50);

            this.Property(t => t.Label)
                .HasMaxLength(100);

            this.Property(t => t.Job)
                .HasMaxLength(30);

            // Table & Column Mappings
            this.ToTable("Sys_UserInfo");
            this.Property(t => t.UserInfoID).HasColumnName("UserInfoID");
            this.Property(t => t.UserID).HasColumnName("UserID");
            this.Property(t => t.Sex).HasColumnName("Sex");
            this.Property(t => t.Birthday).HasColumnName("Birthday");
            this.Property(t => t.Province).HasColumnName("Province");
            this.Property(t => t.City).HasColumnName("City");
            this.Property(t => t.Address).HasColumnName("Address");
            this.Property(t => t.Name).HasColumnName("Name");
            this.Property(t => t.Intro).HasColumnName("Intro");
            this.Property(t => t.FollowCount).HasColumnName("FollowCount");
            this.Property(t => t.FansCount).HasColumnName("FansCount");
            this.Property(t => t.CollectTopicCount).HasColumnName("CollectTopicCount");
            this.Property(t => t.TopicCount).HasColumnName("TopicCount");
            this.Property(t => t.Grade).HasColumnName("Grade");
            this.Property(t => t.VirtualMoney).HasColumnName("VirtualMoney");
            this.Property(t => t.Label).HasColumnName("Label");
            this.Property(t => t.Job).HasColumnName("Job");
            this.Property(t => t.CreateTime).HasColumnName("CreateTime");
        }
    }
}
